#include "Info.h"
//#include "Global.h"
#include "Resource.h"

Info::Info(LPDIRECT3DDEVICE9 d3ddv, LPDIRECT3DSURFACE9 BackBuffer, LPD3DXSPRITE SpriteHandler, float x, float y) : Object(x, y)
{	 
	p_sprite = new Sprite(SpriteHandler, ResourceMng::GetInst(d3ddv, BackBuffer)->GetTexture(L"..\\Resources\\Images\\star.png"), 0, 0); 
}

Info::Info(Sprite* sprite, float x, float y) : Object(x, y)
{
	p_sprite = sprite;
}

Info::~Info()
{
	/*if (_sprite != NULL)
	{
		delete _sprite;
	}*/
}

 

void Info::Render(RECT camera, int cameraX, int cameraY)
{	 
	p_sprite->render(camera.left + pos_x, pos_y, cameraX, cameraY);
}

OBJECT_TYPE Info::getObjectType()
{
	return OBJECT_LAND;
}
 

void Info::Update(list<Object*>* staObjs, list<Object*>* dynObjs, DxInput* input, float gameTime)
{	 
	p_sprite->update(gameTime);	
}